diff options
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/AddDirectoryHelper.kt')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/AddDirectoryHelper.kt | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/AddDirectoryHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/AddDirectoryHelper.kt deleted file mode 100644 index acec7ba5e..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/AddDirectoryHelper.kt +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.yuzu.yuzu_emu.utils - -import android.content.AsyncQueryHandler -import android.content.ContentValues -import android.content.Context -import android.net.Uri -import org.yuzu.yuzu_emu.model.GameDatabase -import org.yuzu.yuzu_emu.model.GameProvider - -class AddDirectoryHelper(private val context: Context) { - fun addDirectory(dir: String?, onAddUnit: () -> Unit) { - val handler: AsyncQueryHandler = object : AsyncQueryHandler(context.contentResolver) { - override fun onInsertComplete(token: Int, cookie: Any?, uri: Uri) { - onAddUnit.invoke() - } - } - - val file = ContentValues() - file.put(GameDatabase.KEY_FOLDER_PATH, dir) - handler.startInsert( - 0, // We don't need to identify this call to the handler - null, // We don't need to pass additional data to the handler - GameProvider.URI_FOLDER, // Tell the GameProvider we are adding a folder - file - ) - } -} |